<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="AeronaveCreateDlg" widgetVar="AeronaveCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateAeronaveTitle}">
            <h:form id="AeronaveCreateForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{aeronaveController.selected != null}">
                        <p:outputLabel value="#{bundle.CreateAeronaveLabel_nmVeiculo}" for="nmVeiculo" />
                        <p:inputText id="nmVeiculo" value="#{aeronaveController.selected.nmVeiculo}" title="#{bundle.CreateAeronaveTitle_nmVeiculo}" required="true" requiredMessage="#{bundle.CreateAeronaveRequiredMessage_nmVeiculo}"/>
                        <p:outputLabel value="#{bundle.CreateAeronaveLabel_txVeiculo}" for="txVeiculo" />
                        <p:inputText id="txVeiculo" value="#{aeronaveController.selected.txVeiculo}" title="#{bundle.CreateAeronaveTitle_txVeiculo}" />
                        <p:outputLabel value="#{bundle.CreateAeronaveLabel_nmMarca}" for="nmMarca" />
                        <p:inputText id="nmMarca" value="#{aeronaveController.selected.nmMarca}" title="#{bundle.CreateAeronaveTitle_nmMarca}" />
                        <p:outputLabel value="#{bundle.CreateAeronaveLabel_nmModelo}" for="nmModelo" />
                        <p:inputText id="nmModelo" value="#{aeronaveController.selected.nmModelo}" title="#{bundle.CreateAeronaveTitle_nmModelo}" />
                        <p:outputLabel value="#{bundle.CreateAeronaveLabel_anoFabricacao}" for="anoFabricacao" />
                        <p:calendar id="anoFabricacao"  pattern="yyyy" value="#{aeronaveController.selected.anoFabricacao}" title="#{bundle.EditAeronaveTitle_anoFabricacao}"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{aeronaveController.create}" value="#{bundle.Save}" update="display,:AeronaveListForm:datalist,:growl" oncomplete="handleSubmit(args,'AeronaveCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="AeronaveCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
